package router

import (
	"gitee.com/DonHz/electronic-business-systems/mxshop-api/order_web/api/order"
	"gitee.com/DonHz/electronic-business-systems/mxshop-api/order_web/api/pay"
	"gitee.com/DonHz/electronic-business-systems/mxshop-api/order_web/middlewares"
	"github.com/gin-gonic/gin"
)

func InitOrderRouter(Router *gin.RouterGroup) {
	OrderRouter := Router.Group("/orders").Use(middlewares.JWTAuth())
	{
		OrderRouter.GET("", order.List)
		OrderRouter.POST("", order.New)
		OrderRouter.GET("/:id", order.Detail)
	}
	PayRouter := Router.Group("/pay")
	{
		PayRouter.POST("/alipay/notify", pay.Notify)
	}
}
